projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5781056
)
(sh-mode): Call sh-set-shell only for a writable
author
Karl Heuer
<kwzh@gnu.org>
Mon, 15 Jul 1996 20:17:53 +0000
(20:17 +0000)
committer
Karl Heuer
<kwzh@gnu.org>
Mon, 15 Jul 1996 20:17:53 +0000
(20:17 +0000)
empty buffer.
lisp/progmodes/sh-script.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/sh-script.el
b/lisp/progmodes/sh-script.el
index 51923ee27952049ebdb40f2b3e4856d1d6396334..fbcdf5c8dbc9507f8df66fed4f7182d3b53dd455 100644
(file)
--- a/
lisp/progmodes/sh-script.el
+++ b/
lisp/progmodes/sh-script.el
@@
-662,10
+662,9
@@
with your script for an edit-interpret-debug cycle."
;; parse or insert magic number for exec() and set all variables depending
;; on the shell thus determined
(goto-char (point-min))
- (sh-set-shell
- (if (looking-at "#![\t ]*\\([^\t\n ]+\\)")
- (match-string 1)
- sh-shell-file)))
+ (and (zerop (buffer-size))
+ (not buffer-read-only)
+ (sh-set-shell sh-shell-file)))
(run-hooks 'sh-mode-hook))
;;;###autoload
(defalias 'shell-script-mode 'sh-mode)